checkout: Don't set dir mtime to 0 when doing a force copy checkout
authorColin Walters <walters@verbum.org>
Fri, 7 Jul 2017 01:33:59 +0000 (21:33 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Fri, 7 Jul 2017 15:01:51 +0000 (15:01 +0000)
commit9d941dcebbbbe0cab1f40adf3269a1562760f9ac
treedde860f478040ce0136e079beb9f57e316fec01e
parentd2a05e5a090f446e0738dafd93299177d6d02f79
checkout: Don't set dir mtime to 0 when doing a force copy checkout

When we [switched to using checkout + force_copy](https://github.com/ostreedev/ostree/commit/e8efd1c8dcaad8fbd3b05c400972d237406263e7),
a side effect that went unnoticed at the time is that we started
setting directory mtimes to zero.

See the below bug where we long ago set the file times to zero, which got fixed,
so let's not regress things by setting the directory times to zero either. (Even
though AFAICS GNU tar doesn't complain about those)

This semantic is somewhat "overloaded" onto `force_copy`, but it avoids adding
yet another boolean; we don't have that many reserved boolean slots left. I
can't really think of many good use cases for `force_copy` *other* than the
`/etc` merge anyways.

https://bugzilla.redhat.com/show_bug.cgi?id=1229160

Closes: https://github.com/ostreedev/ostree/issues/995
Closes: #997
Approved by: jlebon
src/libostree/ostree-repo-checkout.c
tests/installed/itest-deploy-selinux.sh